package com.cross.util;

public class StringUtils {

	public static boolean isEmpty(String str){
		if(null == str){
			return true;
		}
		return false;
	}
	
	public static boolean isNotEmpty(String str){
		return !isEmpty(str);
	}
	
	public static boolean isBlank(String str){
		
		if(isEmpty(str)){
			return true;
		}
		if(str.length()<1){
			return true;
		}
		return false;
	}
	public static boolean isNotBlank(String str){
		return !isBlank(str);
	}

	/**
	 * String 是否为数字
	 */
	public static boolean isNumber(String val){
		try {
			Double.parseDouble(val);
			return true;
		} catch (NumberFormatException e) {
			return false;
		}
	}

	public static String substringBeforeLast(String localPath, String string) {
		// TODO Auto-generated method stub
		return null;
	}	
}
